//对外暴露配置路由(常量路由):全部用户都可以访问到的路由
export const constantRoute = [
    // 登录
    {
        path: '/login',
        component: () => import('@/views/login/index.vue'),
        name: 'Login',
        meta: {
            title: '登录', //菜单标题
            hidden: true, //代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
            icon: 'Promotion', //菜单文字左侧的图标,支持element-plus全部图标
        },
    },
    // 登录成功以后展示数据的路由
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Index',
        meta: {
            title: '',
            hidden: true,
            icon: '',
        },
        redirect: '/home',
        children: [
            {
                path: '/home',
                component: () => import('@/views/home/index.vue'),
                name: 'Home',
                meta: {
                    title: '首页',
                    hidden: false,
                    icon: 'HomeFilled',
                }
            },
        ]
    },
    {
        path: '/user',
        component: () => import('@/layout/index.vue'),
        name: 'User',
        meta: {
            hidden: false,
            title: '用户管理',
            icon: 'User',
        },
        redirect: '/user/info',
        children: [
            {
                path: '/user/info',
                component: () => import('@/views/user/info/index.vue'),
                name: 'UserInfo',
                meta: {
                    hidden: false,
                    title: '个人信息管理',
                    icon: 'Edit',
                },
            },
            {
                path: '/user/student',
                component: () => import('@/views/user/student/index.vue'),
                name: 'UserStudent',
                meta: {
                    hidden: false,
                    title: '学生信息管理',
                    icon: 'Postcard',
                },
            },
        ],
    },
    {
        path: '/record',
        component: () => import('@/layout/index.vue'),
        name: 'Record',
        meta: {
            hidden: false,
            title: '记录管理',
            icon: 'Memo',
        },
        redirect: '/record/health',
        children: [
            {
                path: '/record/health',
                component: () => import('@/views/record/health/index.vue'),
                name: 'RecordHealth',
                meta: {
                    hidden: false,
                    title: '每日健康记录',
                    icon: 'Tickets',
                },
            },
            {
                path: '/record/return',
                component: () => import('@/views/record/return/index.vue'),
                name: 'RecordReturn',
                meta: {
                    hidden: false,
                    title: '返校信息记录',
                    icon: 'MessageBox',
                },
            },
            {
                path: '/record/diagnosis',
                component: () => import('@/views/record/confirm/index.vue'),
                name: 'RecordDiagnosis',
                meta: {
                    hidden: false,
                    title: '确诊信息记录',
                    icon: 'Warning',
                },
            },
        ],
    },
]

//异步路由
export const asyncRoute = [
    // 登录
    {
        path: '/login',
        component: () => import('@/views/login/index.vue'),
        name: 'Login',
        meta: {
            title: '登录', //菜单标题
            hidden: true, //代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
            icon: 'Promotion', //菜单文字左侧的图标,支持element-plus全部图标
        },
    },
    // 登录成功以后展示数据的路由
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Index',
        meta: {
            title: '',
            hidden: true,
            icon: '',
        },
        redirect: '/home',
        children: [
            {
                path: '/home',
                component: () => import('@/views/home/index.vue'),
                name: 'Home',
                meta: {
                    title: '首页',
                    hidden: false,
                    icon: 'HomeFilled',
                }
            },
        ]
    },
    {
        path: '/student/user',
        component: () => import('@/layout/index.vue'),
        name: 'StudentUser',
        meta: {
            hidden: true,
            title: '用户管理',
            icon: 'User',
        },
        redirect: '/student/user/info',
        children: [
            {
                path: '/student/user/info',
                component: () => import('@/views/user/info/index.vue'),
                name: 'StudentUserInfo',
                meta: {
                    hidden: false,
                    title: '个人信息管理',
                    icon: 'Edit',
                },
            },
        ],
    },
    {
        path: '/student/health',
        component: () => import('@/layout/index.vue'),
        name: 'StudentHealth',
        meta: {
            title: '',
            hidden: true,
            icon: '',
        },
        redirect: '/student/health/info',
        children: [
            {
                path: '/student/health/info',
                component: () => import('@/views/student/health/index.vue'),
                name: 'StudentHealthInfo',
                meta: {
                    title: '每日健康上报',
                    hidden: false,
                    icon: 'Tickets',
                }
            },
        ]
    },
    {
        path: '/student/return',
        component: () => import('@/layout/index.vue'),
        name: 'StudentReturn',
        meta: {
            title: '',
            hidden: true,
            icon: '',
        },
        redirect: '/student/return/info',
        children: [
            {
                path: '/student/return/info',
                component: () => import('@/views/student/return/index.vue'),
                name: 'StudentReturnInfo',
                meta: {
                    title: '返校信息上报',
                    hidden: false,
                    icon: 'MessageBox',
                }
            },
        ]
    },
    {
        path: '/student/confirm',
        component: () => import('@/layout/index.vue'),
        name: 'StudentConfirm',
        meta: {
            title: '',
            hidden: true,
            icon: '',
        },
        redirect: '/student/confirm/info',
        children: [
            {
                path: '/student/confirm/info',
                component: () => import('@/views/student/confirm/index.vue'),
                name: 'StudentConfirmInfo',
                meta: {
                    title: '确诊信息上报',
                    hidden: false,
                    icon: 'Memo',
                }
            },
        ]
    },
    {
        path: '/student/warning',
        component: () => import('@/layout/index.vue'),
        name: 'StudentWarning',
        meta: {
            title: '',
            hidden: true,
            icon: '',
        },
        redirect: '/student/warning/info',
        children: [
            {
                path: '/student/warning/info',
                component: () => import('@/views/student/warning/index.vue'),
                name: 'StudentWarningInfo',
                meta: {
                    title: '风险预警信息',
                    hidden: false,
                    icon: 'Warning',
                }
            },
        ]
    },
]


